package com.weiyuwqj.server.log.aop;


import com.weiyuwqj.server.log.annotation.HfAnnotation;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import javax.servlet.http.HttpServletRequest;


/**
 * 自定义切面，和自定义注解联合使用完成日志收集
 * @author Administrator
 *
 */
@Component
@Aspect
public class LogAop {

	@Autowired
	private HttpServletRequest request;

	
	@Pointcut(value="@annotation(com.weiyuwqj.server.log.annotation.HfAnnotation)")
	public void pointCut(){
		
	}
	
	@Around(value="pointCut()&&@annotation(hfAnnotation)")
	public Object aroundAdvice(ProceedingJoinPoint pjp, HfAnnotation hfAnnotation) throws Throwable{


		return pjp.proceed() ;
		
	}


	
}
